﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="True"
    CodeBehind="RegisterUser.aspx.cs" Inherits="University.Workshop.WebApp.RegisterUser" %>

<%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls"
    TagPrefix="BDP" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
    <table align="center">
        <tr>
            <td>
                *First Name:
            </td>
            <td>
                <asp:TextBox ID="TbFirstName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbFirstName" Visible="false" ForeColor="Red" Text="Frist name must have only A-Z a-z characters"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Last Name:
            </td>
            <td>
                <asp:TextBox ID="TbLastName" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbLastName" Visible="false" ForeColor="Red" Text="Last name must have only A-Z a-z characters"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Gender:
            </td>
            <td>
                &nbsp;
                <asp:RadioButton GroupName="currency" ID="rMale" runat="server" Text="Male" Checked="true" />
                &nbsp
                <asp:RadioButton GroupName="currency" ID="rFemale" runat="server" Text="Female" />
            </td>
        </tr>
        <tr>
            <td>
                *Birthday:
            </td>
            <td>
                <asp:TextBox runat="server" ID="calendarBox" ReadOnly="true"></asp:TextBox>
                <asp:ScriptManager runat="server" ID="scriptMan"></asp:ScriptManager>
                <asp:CalendarExtender runat="server" ID="calExtender" TargetControlID="calendarBox"></asp:CalendarExtender>
            </td>
            <td class="style1">
                <asp:Label ID="LbBirthday" Visible="false" ForeColor="Red" Text="You must select your birthday"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Email:
            </td>
            <td>
                <asp:TextBox ID="TbEmail" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbEmail" Visible="false" ForeColor="Red" Text="Wrong email format"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Password:
            </td>
            <td>
                <asp:TextBox ID="TbPass" TextMode="Password" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbPass" Visible="false" ForeColor="Red" Text="Password must have at least 6 chars and 1 digit on it"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Retype Password:
            </td>
            <td>
                <asp:TextBox ID="TbRePass" TextMode="Password" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbRePass" Visible="false" ForeColor="Red" Text="Passwords do not match"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Phone:
            </td>
            <td>
                <asp:TextBox ID="TbPhone" runat="server" MaxLength="30"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbPhone" Visible="false" ForeColor="Red" Text="Phone must be only digits"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Mobile Phone:
            </td>
            <td>
                <asp:TextBox ID="TbMobile" runat="server" MaxLength="30"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbMobilePhone" Visible="false" ForeColor="Red" Text=" MobilePhone must be only digits"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                *Current Department:
            </td>
            <td>
                <asp:DropDownList ID="CbDepartment" runat="server">
                    <asp:ListItem Selected="True" Text="Cochabamba" Value="Cochabamba"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="La Paz" Value="La Paz"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Sta. Cruz" Value="Sta. Cruz"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Oruro" Value="Oruro"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Potosi" Value="Potosi"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Chuquisaca" Value="Chuquisaca"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Tarija" Value="Tarija"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Beni" Value="Beni"></asp:ListItem>
                    <asp:ListItem Selected="False" Text="Pando" Value="Pando"></asp:ListItem>
                </asp:DropDownList>
                <br />
            </td>
        </tr>
        <tr>
            <td>
                *Current City:
            </td>
            <td>
                <asp:TextBox ID="TbCity" runat="server" MaxLength="50"></asp:TextBox>
            </td>
            <td class="style1">
                <asp:Label ID="LbCity" Visible="false" ForeColor="Red" Text="City must have only A-Z a-z chatracters"
                    runat="server">
                </asp:Label>
            </td>
        </tr>
    </table>
    </div>
    <div>
    <table align="center">
        <tr>
            <td style="width: 144px;"></td>
            <td style="width: 126px;">
                Profile Image:
            </td>
            <td>
                <asp:FileUpload ID="Fud_Pic" runat="server" onchange="PreviewImg(this)" />
            </td>
            <td class="style1">
                <asp:Label ID="LbImg" Visible="false" ForeColor="Red" runat="server">
                </asp:Label>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <div id="newPreview">
                </div>
            </td>
            <td>
            </td>
        </tr>
    </table>
    </div>
    <div>
    <table align="center">
        <tr>
            <td style="width: 260px">
                <asp:Label ID="LbAllBlank" Visible="false" ForeColor="Red" runat="server" Text="All fields marked with (*) are obligatory!">
                </asp:Label>
            </td>
            <td>
                <asp:Button ID="BtnSubimt" Text="Register" runat="server" OnClick="BtnSubimt_Click" />
            </td>
        </tr>
    </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 309px;
        }
        #newPreview
        {
            filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale');
        }
    </style>
    <script type="text/javascript">
        function PreviewImg(imgFile) {
            var newPreview = document.getElementById("newPreview");
            newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;
            newPreview.style.width = "80px";
            newPreview.style.height = "60px";
        }
    </script>
</asp:Content>
